<?php
/**
* Very simple Error handling class. 
*
* $Id: Errors.class.php 37 2005-04-03 05:54:36Z vluther $ 				
* @package includes
* @version $Rev: 37 $
* @copyright Copyright &copy; 2000-2007, Linuxpowered, Inc               
* @author Vidyut Luther <vid@linuxpowered.com> 
**/
class ErrorHandler
{

	var $displaytoPage; 
	
	var $error_msg; 
	
	var $error_code ; 
	
	var $isFatal ; 
	
	var $msgColor ; 
	
	function ErrorHandler()
	{
		$this->displaytoPage = null ; 
		$this->error_code = null ;
		$this->error_msg = null ;
		$this->isFatal = null ; 
		$this->msgColor = "#FF0000"; 
	}
	
	
	function mSetdisplaytoPage($disp) 
	{
		$this->displaytoPage = $disp; 
	}
	
	function mSeterror_code($code)
	{
		$this->error_code = $code ; 
	}
	
	function mSeterror_msg($msg)
	{
		$this->error_msg = $msg ;
	}
	
	function mSetisFatal($fatal)
	{
		$this->isFatal = $fatal;
	}

	
	function mDisplayError($msg,$code="111",$isFatal="Y")
	{
		echo '<center> <b><font color=\"'.$this->msgColor.'\"> ' . $msg . '</font>  <BR> </center> </b> ' ; 
		exit ; 
		
	}
}





?>
